package max.ubitest.pipe.events
{
	import flash.events.Event;
	
	public class PipeEvent extends Event
	{
		public static const COMPONENT_SELECTED:String = "componentSelected";
		public static const COMPONENT_UNSELECTED:String = "componentUnselected";
		public static const CELL_SELECTED:String = "cellSelected";
		public static const MAPPED_COMPONENT_SELECTED:String = "mappedComponentSelected";
		public static const RESET:String = "reset";
		public static const DO_VALIDATION:String = "doValidation";
		public static const CLEAR_CELLS_AROUND:String = "clearCellsAround";
		public static const CLEAR:String = "clear";
		
		private var _data:Object;
		
		public function PipeEvent(type:String, data:Object, bubbles:Boolean=false, cancelable:Boolean=false)
		{
			_data = data;
			super(type, bubbles, cancelable);
		}
		
		public function get data():Object{
			return _data;
		}
		
		override public function clone():Event{
			var e:PipeEvent = new PipeEvent(PipeEvent.COMPONENT_SELECTED, data, bubbles, cancelable);
			return e;
		}
	}
}